package gokyesil.game2d.renderer;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle;
import com.badlogic.gdx.utils.Array;

public class Assets 
{
	//Loading Screen Images
	public static Texture loadingImage;
	
	//Main Screen Button Images
	public static Texture newGameImage;
	public static Texture loadGameImage;
	public static Texture mapEditorImage;
	public static Texture settingsImage;
	public static Texture quitImage;
	
	//Block Images
	public static Texture brick1;
	public static Texture brick2;
	public static Texture brick3;
	public static Texture brick4;
	
	public static Texture[] brickList;
	
	public static Texture playTexture;
	public static Texture pauseTexture;
	
	public static Texture camur;
	public static Texture finish;
	
	public static Texture toolbar;

	public static Texture chain;

	public static Texture black;
	
	public static void loadTextures()
	{

		//Main Screen Assets
		Assets.newGameImage = new Texture(Gdx.files.internal("assets/img/main-buttons/NewGame.png"));
		Assets.loadGameImage = new Texture(Gdx.files.internal("assets/img/main-buttons/LoadGame.png"));
		Assets.mapEditorImage = new Texture(Gdx.files.internal("assets/img/main-buttons/MapEditor.png"));
		Assets.settingsImage = new Texture(Gdx.files.internal("assets/img/main-buttons/Settings.png"));
		Assets.quitImage = new Texture(Gdx.files.internal("assets/img/main-buttons/Quit.png"));
		
		Assets.brick1 = new Texture(Gdx.files.internal("assets/img/B1.jpg"));
		Assets.brick2 = new Texture(Gdx.files.internal("assets/img/B2.jpg"));
		Assets.brick3 = new Texture(Gdx.files.internal("assets/img/B3.jpg"));
		Assets.brick4 = new Texture(Gdx.files.internal("assets/img/B4.jpg"));
		
		FileHandle dirHandle = Gdx.files.internal("assets/bricks");
		FileHandle[] fileHandles = dirHandle.list();
		brickList = new Texture[fileHandles.length];
		for (int i=0; i<dirHandle.list().length; i++)
		{
			brickList[i] = new Texture(fileHandles[i]);
		}
		
		Assets.playTexture = new Texture(Gdx.files.internal("assets/actions/play.png"));
		Assets.pauseTexture = new Texture(Gdx.files.internal("assets/actions/pause.png"));
		Assets.camur =  new Texture(Gdx.files.internal("assets/camur.png"));
		Assets.finish =  new Texture(Gdx.files.internal("assets/finish.png"));
		Assets.toolbar =  new Texture(Gdx.files.internal("assets/toolbar.png"));
		Assets.chain =  new Texture(Gdx.files.internal("assets/chain.png"));
		Assets.black =  new Texture(Gdx.files.internal("assets/black.png"));
	}

	public static void getBackground() 
	{
		Assets.loadingImage = new Texture(Gdx.files.internal("assets/img/Loading.png"));
	}
	
}
